package com.yang.mapper;

import com.yang.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    public int registerUser(User user);
    public User selectUserByUsername(String username);
    public User selectUserByEmail(String email);
    public User selectUserByPhone(String phone);
    public User selectUserByUserId(Long userId);
    public int updateUser(User user);
    public User loginByUsername(@Param("username") String username, @Param("password") String password);
    public int resetPassword(@Param("username") String username, @Param("password") String password);
    // 分页查询所有用户
    List<User> selectAllUsers();
    // 分页查询普通用户方法
    List<User> selectNormalUsers();
}
